var i = 0, mygroup;

function newWin() {
	var win = new Ext.Window({
				title : "窗口" + i++,
				width : 400,
				height : 300,
				maximizable : true,
				manager : mygroup
			});
	win.show();
}

function toBack() {
	mygroup.sendToBack(mygroup.getActive());
}

function hideAll() {
	mygroup.hideAll();
}

Ext.onReady(function() {
			mygroup = new Ext.WindowGroup();
			Ext.get("btn").on("click", newWin);
			Ext.get("btnToBack").on("click", toBack);
			Ext.get("btnHide").on("click", hideAll);
		});